#include"process.h"
#include<stdio.h>
#include<string.h>
#include<unistd.h>
#include<string.h>
#define NUM 101
#define STYLE '='
#define POINT '.'
#define SPACE ' '
const  int pnum=6;
void FlushProcess(double total ,double current)
{
  double rate =(current/total)*100;
  char bar[NUM];
  memset(bar ,'\0',sizeof(bar));
  int i=0;
for( i=0;i<(int)rate ;i++)
{bar[i]=STYLE;

 }
static int num=0;
num++;
num%=pnum;
char points[pnum+1];
memset(points,'\0',sizeof(points));

for(int  j=0;i<pnum;i++)
{
  if(i<num)points[i]= POINT;
  else points[i]=SPACE ;
}
printf("[%-100s][%.1lf%%]%s\r",bar,rate,points);
fflush(stdout);
}
